home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / basic / PureBasic_Upd.lha / PureBasic_Update1.60 / PureBasic / Examples / Sources / Chunky.pb < prev    next >
Encoding:
Text File  |  2000-09-10  |  768 b   |  54 lines

  1.  
  2. InitChunky(0)
  3. InitBitMap(0)
  4. InitScreen(0)
  5.  
  6. #Width  = 320
  7. #Height = 200
  8.  
  9. *MyChunky = AllocateChunkyBuffer(0, #Width, #Height)
  10. AllocateLinearBitMap(0, #Width, 256, 8)
  11.  
  12. DrawingOutput(BitMapRastport())
  13.  
  14. Cls(2) ; Black border :)
  15.  
  16. ChunkyCls(3)
  17.  
  18. ;For x=0 To 10 Step 2
  19. ;  ChunkyPlotFast(x, x, 6)
  20. ;Next
  21.  
  22. for x=0 to 320 step 2
  23.   for y=0 to 180 step 2
  24.     ChunkyPlot(x,y,6)
  25.   next
  26. next
  27.  
  28. Dim Shape1.b(15*15)
  29.  
  30. Shape1(0)  = 3
  31. Shape1(9) = 3
  32. Shape1(99) = 3
  33. Shape1(90)  = 3
  34.  
  35.  
  36. If OpenScreen(0, 320, #Height, 8, 0)
  37.  
  38.   ShowBitMap(0, ScreenID(), 0, 0)
  39.  
  40.   Delay(40)
  41.  
  42.  ; Repeat
  43.  ;   a+1
  44.  ;   ChunkyBlock(9, 9, @Shape1(), a, 50)
  45.     ChunkyToPlanar(*MyChunky, BitMapID(), 200)  ; Convert the chunky buffer to planar ! You can specify the height too.
  46.  ; Until a = 25
  47.  
  48. EndIf
  49.  
  50. MouseWait()
  51. End
  52.  
  53.  
  54.